package com.woniuxy.service.impl;

import com.woniuxy.api.RemoteProductServe;
import com.woniuxy.entity.ProductDTO;
import com.woniuxy.entity.utils.ResponseEntity;
import com.woniuxy.service.OrderServiceByProduct;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author: 邓宇昂
 * @Description: TODO
 * @DateTime: 22/12/07/0007 11:42
 * @Component: 成都蜗牛学苑
 **/
@Service
public class OrderServiceByProductImpl implements OrderServiceByProduct {
    @Autowired
    RemoteProductServe remoteProductServe;
    @Override
    public ResponseEntity findProductList(String name, double minPrice, double maxPrice) {
//        return remoteProductServe.findAllByNameOrPrice(name,minPrice,maxPrice);
//        Map map = new HashMap<>();
//        map.put("name",name);
//        map.put("minPrice",minPrice);
//        map.put("maxPrice",maxPrice);
        return remoteProductServe.findAllByNameOrPrice(new ProductDTO(name,minPrice,maxPrice));
    }
}
